function CreateXmlHttpReq()
{
      var req;
      if (window.XMLHttpRequest) {
        // Firefox, Safari, Opera ...
        req = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
        // Internet Explorer 5+
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } else {
        alert("Problemas al crear el objeto XMLHttpRequest.\nExplorador no soportado ?");
      }
      return req;
}

// XMLHttp send GET request
function XmlHttpGET(xmlhttp, url)
{
      try {
            xmlhttp.open("GET", url, true);
            xmlhttp.send(null);
      } catch (ex) {
            // do nothing
      }
}

// XMLHttp send POST request
function XmlHttpPOST(xmlhttp, url, data)
{
      try {
        xmlhttp.open("POST", url, true);
        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset='iso-8859-1'");
        xmlhttp.send(data);
      } catch (ex) {
        // do nothing
      }
}
